package com.ruoyi.asset.service.impl;

import java.util.List;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.asset.mapper.AssetStandardConfigurationMapper;
import com.ruoyi.asset.domain.AssetStandardConfiguration;
import com.ruoyi.asset.service.IAssetStandardConfigurationService;
import com.ruoyi.common.core.text.Convert;

/**
 * 标准配置Service业务层处理
 *
 * @author ruoyi
 * @date 2023-04-06
 */
@Service
public class AssetStandardConfigurationServiceImpl extends ServiceImpl<AssetStandardConfigurationMapper, AssetStandardConfiguration> implements IAssetStandardConfigurationService {
    @Autowired
    private AssetStandardConfigurationMapper assetStandardConfigurationMapper;

    /**
     * 查询标准配置
     *
     * @param id 标准配置主键
     * @return 标准配置
     */
    @Override
    public AssetStandardConfiguration selectAssetStandardConfigurationById(Long id) {
        return assetStandardConfigurationMapper.selectAssetStandardConfigurationById(id);
    }

    /**
     * 查询标准配置列表
     *
     * @param assetStandardConfiguration 标准配置
     * @return 标准配置
     */
    @Override
    public List<AssetStandardConfiguration> selectAssetStandardConfigurationList(AssetStandardConfiguration assetStandardConfiguration) {
        return assetStandardConfigurationMapper.selectAssetStandardConfigurationList(assetStandardConfiguration);
    }

    /**
     * 新增标准配置
     *
     * @param assetStandardConfiguration 标准配置
     * @return 结果
     */
    @Override
    public int insertAssetStandardConfiguration(AssetStandardConfiguration assetStandardConfiguration) {
        return assetStandardConfigurationMapper.insertAssetStandardConfiguration(assetStandardConfiguration);
    }

    /**
     * 修改标准配置
     *
     * @param assetStandardConfiguration 标准配置
     * @return 结果
     */
    @Override
    public int updateAssetStandardConfiguration(AssetStandardConfiguration assetStandardConfiguration) {
        return assetStandardConfigurationMapper.updateAssetStandardConfiguration(assetStandardConfiguration);
    }

    /**
     * 批量删除标准配置
     *
     * @param ids 需要删除的标准配置主键
     * @return 结果
     */
    @Override
    public int deleteAssetStandardConfigurationByIds(String ids) {
        return assetStandardConfigurationMapper.deleteAssetStandardConfigurationByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除标准配置信息
     *
     * @param id 标准配置主键
     * @return 结果
     */
    @Override
    public int deleteAssetStandardConfigurationById(Long id) {
        return assetStandardConfigurationMapper.deleteAssetStandardConfigurationById(id);
    }
}
